const returnCustomValue = (field, params) => (typeof field === 'function' ? field(params) : field);
// 转换异常值
const emptyValueToDefault = (source) => {
  if (
    JSON.stringify(source) === '{}' ||
    JSON.stringify(source) === '[]' ||
    source === '' ||
    source === undefined ||
    source === null ||
    Number.isNaN(source)
  ) {
    source = '--';
  }
  return source;
};

export { returnCustomValue, emptyValueToDefault };
